<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       img{
        position: absolute;
        width: 500px;
        height: auto;
        top: 2px;
       }
    </style>
</head>
<body>
    <img src="v.jpg" alt="">
</body>
<script>
    let pt = document.querySelector('img');
    document.addEventListener('mousemove',function(e){
        let x = e.pageX;
        let y = e.pageY;
        pt.style.left=x-50+'px';
        pt.style.top=y-40+'px';
    });
</script>
</html>